<template>
  <div class="product">
    <h3>标题:{{proname}}</h3>
    <p>价格:{{proprice}}</p>
    <p>描述:{{desc}} <button @click="dd">砍一刀</button></p>
  </div>
</template>
 
<script>
export default {
  name: "XiaoHei",
  components: {},
  props: ['id','proname','proprice','desc'],
  data() {
    return {};
  },
  computed: {},
  watch: {},
  created() {},
  methods: {
    dd(){
      this.$emit('mm',this.id,10)
    }
  }
};
</script>

<style lang="less" scoped>
.product {
  width: 400px;
  border: 3px solid #000;
  border-radius: 5px;
  margin: 10px;
  padding: 0 20px;
}
</style>